<?php
namespace App\Logics;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\GoodsLeaseModel;

//逻辑处理
class GoodsLeaseLogic extends BaseLogic {


    public function __construct()
    {
        parent::__construct();

    }


    public static function getListByGoodsId(int $goods_id,$fields=['*']){
        $data= GoodsLeaseModel::where('goods_id',$goods_id)->select($fields)->get();
        return ob_to_array($data);
    }

    public static function getOne(int $id,$fields=['*']){
        $data= GoodsLeaseModel::where('id',$id)->select($fields)->first();
        return ob_to_array($data);
    }







}
